{% extends 'manager_base.html' %}



{% block content %}
    <div class="container" style="margin-top: 60px">
        {#按钮#}
        <div style="margin-bottom: 10px" class="clearfix">
            <a class="btn btn-success" href="/manager/manager/add/">
                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
                新建管理员
            </a>
            <div style="width: 300px;float: right">
                <form method="get">
                    <div class="input-group">

                        <input type="text" name="query" class="form-control" placeholder="Search for..."
                               value="{{ search_data }}">
                        <span class="input-group-btn">
                    <button class="btn btn-default" type="submit">
                        <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                    </button>
                    </span>
                    </div>
                </form>
            </div>
        </div>
        {#面板#}
        <div class="panel-body">
            {#    表格#}
            <div class="panel panel-default">
                <!-- Default panel contents -->
                <div class="panel-heading">用户列表</div>

                <!-- Table -->
                <table class="table table-bordered">
                    <thead>
                    <tr>
                        <th>用户名</th>
                        <th>密码</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for obj in queryset %}
                        <tr>
                            <td>{{ obj.Manager_name }}</td>
                            <td>{{ obj.Manager_password }}</td>
                            <td>
                                <a class="btn btn-primary btn-xs" href="/manager/manager/{{ obj.id }}/edit/">编辑</a>
                                <a class="btn btn-danger btn-xs" href="/manager/manager/{{ obj.id }}/delete/">删除</a>
                            </td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
        {#分页#}
        <div>
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    {{ page_string }}
                </ul>
            </nav>
        </div>
    </div>
{% endblock %}